package com.youlian.manager.api;

import com.youlian.utils.http.HttpClientUtils;


/**
 *
 * @author simon
 *
 */
public class BaseAPI {
	/**
	 * 执行doGet方法，发送请求
	 * @param url
	 * @return
	 * @throws Exception
	 */
	protected String doGet(String url) throws Exception {
		HttpClientUtils client = new HttpClientUtils();
		return client.doGet(url);
	}

	/**
	 *
	 * @param url
	 * @param charset
	 * @return
	 * @throws Exception
	 */
	protected String doGet(String url,String charset) throws Exception {
		HttpClientUtils client = new HttpClientUtils();
		return client.doGet(url,charset);
	}

	/**
	 * 执行doPost方法，发送请求
	 * @param url
	 * @param charset
	 * @return
	 * @throws Exception
	 */
	protected String doPost(String url,String charset,String data) throws Exception {
		HttpClientUtils client = new HttpClientUtils();
		return client.doPost(url,charset,data);
	}
}
